class PublicController < ApplicationController
  layout  nil
  session :off
  def public
    if file = params[:file]
      file_path = "#{RAILS_ROOT}/public/#{file}"
      render(:file => file_path, :content_type => params[:content_type])
    elsif image = params[:image]
      file_path = "#{RAILS_ROOT}/public/images/#{image}"
      render(:file => file_path, :content_type => "image/jpeg")
    else
      render(:nothing => true, :status => 404)
    end
  end
end
